package token;

import java.util.Hashtable;


public abstract class ReservedWords {

	private static Hashtable<String, Token> identifiers;

	static {
		identifiers=new Hashtable<String, Token>();
		identifiers.put("integer",Token.buildTYPE_IDENTIFIER("integer"));
		identifiers.put("real",Token.buildTYPE_IDENTIFIER("real"));
		identifiers.put("char",Token.buildTYPE_IDENTIFIER("char"));
		identifiers.put("boolean",Token.buildTYPE_IDENTIFIER("boolean"));
		identifiers.put("while",Token.buildWHILE());
 		identifiers.put("Absolute",Token.buildABSOLUTE());
 		identifiers.put("Abstract",Token.buildABSTRACT());
 		identifiers.put("Alias",Token.buildALIAS());
 		identifiers.put("And",Token.buildAND());
 		identifiers.put("array",Token.buildARRAY());
 		identifiers.put("As",Token.buildAS());
 		identifiers.put("ASM",Token.buildASM());
 		identifiers.put("Assembler",Token.buildASSEMBLER());
 		identifiers.put("begin",Token.buildBEGIN());
 		identifiers.put("break",Token.buildBREAK());
 		identifiers.put("case",Token.buildCASE());
 		identifiers.put("CDECL",Token.buildCDECL());
 		identifiers.put("Class",Token.buildCLASS());
 		identifiers.put("const",Token.buildCONST());
 		identifiers.put("Constructor",Token.buildCONSTRUCTOR());
 		identifiers.put("Continue",Token.buildCONTINUE());
 		identifiers.put("Default",Token.buildDEFAULT());
 		identifiers.put("Destructor",Token.buildDESTRUCTOR());
 		identifiers.put("Dispose",Token.buildDISPOSE());
 		identifiers.put("DIV",Token.buildDIV());
 		identifiers.put("do",Token.buildDO());
 		identifiers.put("Down To",Token.buildDOWNTO());
 		identifiers.put("else",Token.buildELSE());
 		identifiers.put("end",Token.buildEND());
 		identifiers.put("Except",Token.buildEXCEPT());
 		identifiers.put("Exit",Token.buildEXIT());
 		identifiers.put("Exports",Token.buildEXPORTS());
 		identifiers.put("Export",Token.buildEXPORT());
 		identifiers.put("External",Token.buildEXTERNAL());
 		identifiers.put("false",Token.buildFALSE());
 		identifiers.put("Far",Token.buildFAR());
 		identifiers.put("file",Token.buildFILE());
 		identifiers.put("Finalization",Token.buildFINALIZATION());
 		identifiers.put("Finally",Token.buildFINALLY());
 		identifiers.put("for",Token.buildFOR());
 		identifiers.put("forward",Token.buildFORWARD());
 		identifiers.put("function",Token.buildFUNCTION());
 		identifiers.put("Go To",Token.buildGOTO());
 		identifiers.put("if",Token.buildIF());
 		identifiers.put("Implementation",Token.buildIMPLEMENTATION());
 		identifiers.put("in",Token.buildIN());
 		identifiers.put("Index",Token.buildINDEX());
 		identifiers.put("Inherited",Token.buildINHERITED());
 		identifiers.put("Initialization",Token.buildINITIALIZATION());
 		identifiers.put("In Line",Token.buildINLINE());
 		identifiers.put("Interface",Token.buildINTERFACE());
 		identifiers.put("Is",Token.buildIS());
 		identifiers.put("label",Token.buildLABEL());
 		identifiers.put("Library",Token.buildLIBRARY());
 		identifiers.put("Mod",Token.buildMOD());
 		identifiers.put("Name",Token.buildNAME());
 		identifiers.put("Near",Token.buildNEAR());
 		identifiers.put("New",Token.buildNEW());
 		identifiers.put("Nil",Token.buildNIL());
 		identifiers.put("Not",Token.buildNOT());
 		identifiers.put("Object",Token.buildOBJECT());
 		identifiers.put("of",Token.buildOF());
 		identifiers.put("On",Token.buildON());
 		identifiers.put("Operator",Token.buildOPERATOR());
 		identifiers.put("or",Token.buildOR());
 		identifiers.put("Override",Token.buildOVERRIDE());
 		identifiers.put("packed",Token.buildPACKED());
 		identifiers.put("Pascal",Token.buildPASCAL());
 		identifiers.put("PopStack",Token.buildPOPSTACK());
 		identifiers.put("Private",Token.buildPRIVATE());
 		identifiers.put("procedure",Token.buildPROCEDURE());
 		identifiers.put("program",Token.buildPROGRAM());
 		identifiers.put("Property",Token.buildPROPERTY());
 		identifiers.put("Protected",Token.buildPROTECTED());
 		identifiers.put("Public",Token.buildPUBLIC());
 		identifiers.put("Published",Token.buildPUBLISHED());
 		identifiers.put("Raise",Token.buildRAISE());
 		identifiers.put("Read",Token.buildREAD());
 		identifiers.put("record",Token.buildRECORD());
 		identifiers.put("Register",Token.buildREGISTER());
 		identifiers.put("repeat",Token.buildREPEAT());
 		identifiers.put("Save Registers",Token.buildSAVEREGISTERS());
 		identifiers.put("Self",Token.buildSELF());
 		identifiers.put("set",Token.buildSET());
 		identifiers.put("SHL",Token.buildSHL());
 		identifiers.put("SHR",Token.buildSHR());
 		identifiers.put("STD Call",Token.buildSTDCALL());
 		identifiers.put("then",Token.buildTHEN());
 		identifiers.put("To",Token.buildTO());
 		identifiers.put("true",Token.buildTRUE());
 		identifiers.put("Try",Token.buildTRY());
 		identifiers.put("type",Token.buildTYPE());
 		identifiers.put("Unit",Token.buildUNIT());
 		identifiers.put("until",Token.buildUNTIL());
 		identifiers.put("Uses",Token.buildUSES());
 		identifiers.put("var",Token.buildVAR());
 		identifiers.put("Virtual",Token.buildVIRTUAL());
 		identifiers.put("With",Token.buildWITH());
 		identifiers.put("XOR",Token.buildXOR());
	}

	public int getLevel() {
		return 0;
	}
	
	public static Token isAReservedWord(String tokenKey) {
		return identifiers.get(tokenKey);
	}	
	
}
